package com.xiaolei.baselib.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 获得SharedPreference的注解
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface SharedPreference
{
    public String value();   
    /**
     * 获取字符串
     * @author 肖蕾
     */
    @Target(ElementType.FIELD)
    @Retention(RetentionPolicy.RUNTIME)
    public static @interface getString
    {
    	public String config();
    	public String name();   
    }
    /**
     * 获取boolean
     * @author 肖蕾
     */
    @Target(ElementType.FIELD)
    @Retention(RetentionPolicy.RUNTIME)
    public static @interface getBoolean
    {
    	public String config();
    	public String name();  
    }
    
    /**
     * 获取整数
     * @author 肖蕾
     */
    @Target(ElementType.FIELD)
    @Retention(RetentionPolicy.RUNTIME)
    public static @interface getInt
    {
    	public String config();
    	public String name();  
    }
    
    /**
     * 获取小数
     * @author 肖蕾
     */
    @Target(ElementType.FIELD)
    @Retention(RetentionPolicy.RUNTIME)
    public static @interface getFloat
    {
    	public String config();
    	public String name();  
    }
}
